package br.domsd.pocketcontrol.action;

import java.util.List;

import br.domsd.pocketcontrol.exceptions.SaldoInicialNullException;
import br.domsd.pocketcontrol.model.Expense;
import br.domsd.pocketcontrol.model.MonthExpenses;

public class Calculadora {
/*
	private MonthExpenses gastosMensais;
	
	public void inicializarGastosMensais()
	{
		gastosMensais = new MonthExpenses();
	}
	
	public Double getTotalGastos()
	{
		Double total = 0D;
		List<Expense> gastosDiarios = gastosMensais.getGastosDiarios();
		
		if(gastosDiarios != null)
		{
			for(Expense gasto : gastosDiarios)
			{
				total = total + gasto.getValor();
			}
		}
		
		return total;
	}
	
	public Double getSaldoAtualDisponivel() 
	{
		Double saldoInicial = gastosMensais.getSaldoInicial();
		
		if(saldoInicial == null)
		{
			throw new SaldoInicialNullException();
		}
		
		return saldoInicial - getTotalGastos();
	}

	public void setGastosMensais(MonthExpenses paramGastosMensais)
	{
		gastosMensais = paramGastosMensais;
	}
	
	public MonthExpenses getGastosMensais()
	{
		return gastosMensais;
	}
*/
}
